import baseService from '../baseService/index.js'
import {responseInterceptor} from './interceptor/index.js'

const  loginApi = async (params)=>{
    try{
        let res = await baseService.post("/login",params)
        return responseInterceptor(res)
    }catch(err){
        alert('未知异常')
    }
}

const logoutApi =async ()=>{
    try{
        let res = await baseService.post("/logout")
        return responseInterceptor(res)
    }catch(err){
        alert('未知异常')
    }
}


export {
    loginApi,
    logoutApi,
}